A database is a collection of stored data that is logically related and that is accessible by one or more users or applications. A popular type of database is the relational database management system (RDBMS), which includes relational tables, also referred to as relations, made up of rows and columns (also referred to as tuples and attributes). Each row represents an occurrence of an entity defined by a table, with an entity being a person, place, thing, or other object about which the table contains information.
Database systems may store large amounts of data and other objects. Some of the objects may be used more frequently than other objects. Often, it is desirable for a database administrator (DBA) to know which database objects are used rarely, or not at all. This information may allow the administrator to more efficiently store the database objects or even purge unused database objects from the database system. Likewise, it is often desirable for the database administrator to know which database objects are used most frequently than other objects. Based on this information, the most-frequently-used database objects may advantageously be indexed. Database usage statistics are also useful in a closed-loop feedback environment.
Contemporary Database Object Use Count (DOUC) features provide a mechanism for a DBA to determine the frequency of use of database objects. This information can be used to identify obsolete or dormant objects that may be dropped to save disk space, utilized to generate indexes on frequently used objects to reduce the requisite search space, and provide other various advantages. The DOUC feature collects object use data and stores the information in a Data Dictionary for ease of reporting. Because it is integrated with the database it has the ability to count objects referenced in the SQL text as well as in the query execution plan.
Current implementations of DOUCs provide a general method for collecting, merging, sorting and storing aggregated counts with associated timestamps in the data dictionary. However, current DOUC implementations may result in system bottlenecks at a parsing engine due to the use of nested linked lists and sorting of DOUC data.